
import service from '@/utils/request'
import url from './url'

/**
 * 新增
 * @param {*} data 
 * @returns null
 */
export const tplAdd = (data) => {
  return service({
    url: url.add,
    method: 'post',
    data
  })
}

/**
 * 列表
 * @param {*} params 
 * @returns list
 */
export const tplList = (params) => {
  return service({
    url: url.list,
    method: 'get',
    params
  })
}

/**
 * 详情
 * @param {*} params 
 * @returns null
 */
export const tplDetail = (params) => {
  return service({
    url: url.tplGet,
    method: 'get',
    params
  })
}
/**
 * 修改
 * @param {*} data 
 * @returns null
 */
export const tplEdit = (data) => {
  return service({
    url: url.tplEdit,
    method: 'post',
    data
  })
}

/**
 * 删除
 * @param {*} params
 * @returns null
 */
export const docDel = (params) => {
  return service({
    url: url.docDel,
    method: 'get',
    params
  })
}
